{ "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Message Center API", "description": "Message Center corresponds to [order transactional email templates](https://help.vtex.com/en/tutorial/order-transactional-email-templates--3g2S2kqBOoSGcCaqMYK2my). The store can configure templates to automatically send emails to customers and notify them about their order events, such as payment confirmation and shipping.\r\n\r\n## Message Center API Index \r\n\r\n### DKIM configuration\r\n\r\n- `POST` [Generate DKIM keys](https://developers.vtex.com/docs/api-reference/message-center-api#post-/api/mail-service/pvt/providers/-EmailProvider-/dkim)", "license": { "name": "MIT" } }, "servers": [ { "url": "https://{accountName}.{environment}.com.br", "description": "VTEX server URL.", "variables": { "accountName": { "description": "Name of the VTEX account. Used as part of the URL.", "default": "apiexamples" }, "environment": { "description": "Environment to use. Used as part of the URL.", "enum": [ "vtexcommercestable" ], "default": "vtexcommercestable" } } } ], "paths": { "/api/mail-service/pvt/providers/{EmailProvider}/dkim": { "post": { "summary": "Generate DKIM keys", "description": "Create [DKIM keys](https://developers.vtex.com/docs/guides/setting-up-dkim-for-transactional-emails) for a sender that was [set up](https://help.vtex.com/en/tracks/transactional-emails--6IkJwttMw5T84mlY9RifRP/42LVaxtFb2VHX9xTZU58qC) in VTEX mail servers. \r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Message Center | Providers | **Add or edit provider** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "operationId": "createDKIM", "tags": [ "DKIM configuration" ], "parameters": [ { "name": "EmailProvider", "in": "path", "required": true, "description": "Email address for the sender that was set up in VTEX mail servers.", "schema": { "type": "string", "example": "help@valdiestore.co" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "description": "DKIM key creation response body object.", "properties": { "status": { "type": "string", "description": "DKIM key generating status in string format. For the response `emailNotFound` and `emailNotVerified`, the sender email should be [set up or revised](https://developers.vtex.com/docs/guides/setting-up-dkim-for-transactional-emails).", "enum": [ "emailNotFound", "emailNotVerified", "created" ] }, "dkimKeys": { "type": "array", "description": "This field returns DKIM keys when they were successfully created, and `null` when they were not.", "items": { "type": "string", "description": "DKIM key values." }, "nullable": true } } }, "examples": { "emailNotFound": { "summary": "emailNotFound", "value": { "status": "emailNotFound", "dkimKeys": null } }, "emailNotVerified": { "summary": "emailNotVerified", "value": { "status": "emailNotVerified", "dkimKeys": null } }, "created": { "summary": "created", "value": { "status": "created", "dkimKeys": [ "'n3zbltwizctxpgcmqrars4bmfdd3zlyo._domainkey.valdie.co','CNAME','n3zbltwizctxpgcmqrars4bmfdd3zlyo.dkim.amazonses.com'", "'sq4iae4be52fhqq3wm44btttvndeecfv._domainkey.valdie.co','CNAME','sq4iae4be52fhqq3wm44btttvndeecfv.dkim.amazonses.com'", "'n4z6g2g7yfy4pnhjklfesxrrkt4o2ha4._domainkey.valdie.co','CNAME','n4z6g2g7yfy4pnhjklfesxrrkt4o2ha4.dkim.amazonses.com'" ] } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "description": "URL with information about the error code status type of the request." }, "title": { "type": "string", "description": "Error status code title." }, "status": { "type": "integer", "description": "Error status code number." }, "traceId": { "type": "string", "description": "Trace ID value. For example, a store [creates a pattern](https://developers.vtex.com/docs/guides/setting-up-dkim-for-transactional-emails) like `^00-[0-9a-f]{32}-[0-9a-f]{16}-00$` and generates a `traceId` like `00-f8949e0e2a80ff4481b4375908349701-a6a7ecf8b50a2043-00`." } } }, "example": { "type": "https://tools.ietf.org/html/rfc7235#section-3.1", "title": "Unauthorized", "status": 401, "traceId": "00-f8949e0e2a80ff4481b4375908349701-a6a7ecf8b50a2043-00" } } } } } } } }, "security": [ { "appKey": [], "appToken": [] }, { "VtexIdclientAutCookie": [] } ], "components": { "securitySchemes": { "appKey": { "type": "apiKey", "in": "header", "name": "X-VTEX-API-AppKey", "description": "Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)." }, "appToken": { "type": "apiKey", "in": "header", "name": "X-VTEX-API-AppToken", "description": "Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys)." }, "VtexIdclientAutCookie": { "type": "apiKey", "in": "header", "name": "VtexIdclientAutCookie", "description": "[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours." } } }, "tags": [ { "name": "DKIM configuration" } ] }